From 6dfbe3b4f8e6a1f9f8e9b494c21da35618684936 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sun, 8 Jun 2008 21:41:16 +0000 Subject: [PATCH] =?utf8?q?Bug=20131920=20=E2=80=93=20gtkNotebook=20sends?= =?utf8?q?=20incorrect=20switch=5Fpage=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2008-06-08 Björn Lindqvist Bug 131920 – gtkNotebook sends incorrect switch_page value * gtk/gtknotebook.c (gtk_notebook_real_remove): Make switch-page signal send correct page index when page index 0 is active and removed. (#131920, Samuel Fogh) svn path=/trunk/; revision=20339 --- ChangeLog | 8 ++++++++ gtk/gtknotebook.c | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d1bee3248..32c59ce807 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-08 Björn Lindqvist + + Bug 131920 – gtkNotebook sends incorrect switch_page value + + * gtk/gtknotebook.c (gtk_notebook_real_remove): Make switch-page + signal send correct page index when page index 0 is active and + removed. (#131920, Samuel Fogh) + 2008-06-08 Kristian Rietveld Bug 536730 - memory corruption in gtktreeview diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 3bce620c83..9a1c26eb92 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4323,9 +4323,11 @@ gtk_notebook_real_remove (GtkNotebook *notebook, priv = GTK_NOTEBOOK_GET_PRIVATE (notebook); destroying = GTK_OBJECT_FLAGS (notebook) & GTK_IN_DESTRUCTION; - next_list = gtk_notebook_search_page (notebook, list, STEP_PREV, TRUE); + next_list = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE); if (!next_list) - next_list = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE); + next_list = gtk_notebook_search_page (notebook, list, STEP_PREV, TRUE); + + notebook->children = g_list_remove_link (notebook->children, list); if (notebook->cur_page == list->data) { @@ -4370,7 +4372,6 @@ gtk_notebook_real_remove (GtkNotebook *notebook, if (!page->default_menu) g_object_unref (page->menu_label); - notebook->children = g_list_remove_link (notebook->children, list); g_list_free (list); if (page->last_focus_child) -- 2.30.2